package cn.luckdou.system.mapper.bus_dict;

import cn.luckdou.system.model.bus_dict.BusDict;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
  * 业务字典 Mapper 接口
 * </p>
 *
 * @author Dadou
 * @since 2017-08-08
 */
public interface BusDictMapper extends BaseMapper<BusDict> {

    @Select("SELECT description,type FROM tb_bus_dict GROUP BY type;")
    List<BusDict> selectTypeGroupByType();

    @Select("SELECT * FROM tb_bus_dict where type=#{type} ORDER BY hsort;")
    List<BusDict> getListByType(@Param("type") String type);

}